

package com.yiyi.credit.manage.sso.mapper;

import com.yiyi.credit.manage.sso.common.mapper.CommonMapper;
import com.yiyi.credit.manage.sso.common.page.Pagination;
import com.yiyi.credit.manage.sso.model.entity.SysUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;


import java.util.List;
import java.util.Map;


public interface SysUserMapper extends CommonMapper<SysUser> {


    @SelectProvider(type = SysUserSqlProvider.class, method = "queryForPage")
    List<Map<String, Object>> getPageData(@Param("userName") String userName,
                                          @Param("pagination") Pagination pagination);


    @SelectProvider(type = SysUserAllInfoSqlProvider.class, method = "queryForPage")
    List<Map<String, Object>> getUserAllInfoPageData(@Param("sysInfoId") Long sysInfoId,
                                                     @Param("userName") String userName,
                                                     @Param("roleName") String roleName,
                                                     @Param("roleNameId") Long roleNameId,
                                                     @Param("status") Long status,
                                                     @Param("pagination") Pagination pagination);



    @SelectProvider(type = SysUserAllInfoSqlProvider.class, method = "queryUser")
    Map<String, Object> getUserInfoById(@Param("sysInfoId") Long sysInfoId,
                                        @Param("id") Long id);



    @SelectProvider(type = SysUserAllInfoSqlProvider.class, method = "queryCount")
    Long getSysRoleList(@Param("sysInfoId") Long sysInfoId,
                        @Param("userName") String userName,
                        @Param("roleName") String roleName,
                        @Param("roleNameId") Long roleNameId,
                        @Param("status") Long status,
                        @Param("pagination") Pagination pagination);


}
